home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-10-06 | 6.1 KB | 222 lines | [TEXT/R*ch] |
- #-----------------------------------------------------------------------
- # Makefile for MPW (Macintosh Programmers Workshop by Apple)
- #
- # Project: SpriteWorldUtils
- # File: SpriteWorldUtils.make
- #
- # Targets: All (default), Debug, Final
- # Clean (remove objects), Clean-All (remove binaries)
- #
- # Written by Anders F Björklund <afb@algonet.se>
- #-----------------------------------------------------------------------
-
- Makefile = "SpriteWorldUtils.make" # high-level make (this file)
- MakeOutput = "SpriteWorldUtils.makelow"# low-level make (built by this file)
-
- SpriteWorldUtils ƒ All # Default High-Level Target
- All ƒ Debug Final
- Final ƒ 68K.Final PPC.Final
- Debug ƒ 68K.Debug PPC.Debug
- Clean ƒ Clean.Debug Clean.Final
- Clean-All ƒ Clean-All.Debug Clean-All.Final
-
- #----------------------------------------------------
-
- Tgt = #
- Opt = #
- Sym = #
- Dbg = #
- Mbg = #
-
- Common = -f {Makefile}
-
- Debug = -d Tgt=Debug ∂
- -d Opt=off ∂
- -d Sym=on ∂
- -d Dbg=Debug
-
- Final = -d Tgt=Final ∂
- -d Opt=speed ∂
- -d Sym=off ∂
- -d Dbg=
-
- Debug68K = {Common} {Debug} -d Mbg="-mbg on"
- DebugPPC = {Common} {Debug} -d Mbg="-tb on"
- Final68K = {Common} {Final} -d Mbg="-mbg off"
- FinalPPC = {Common} {Final} -d Mbg=""
-
- #----------------------------------------------------
- # The high-level targets
- #----------------------------------------------------
-
- 68K.Debug ƒ $OutOfDate
- Make -d Binary=68K {Debug68K} 68K >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- PPC.Debug ƒ $OutOfDate
- Make -d Binary=PPC {DebugPPC} PPC >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- 68K.Final ƒ $OutOfDate
- Make -d Binary=68K {Final68K} 68K >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- PPC.Final ƒ $OutOfDate
- Make -d Binary=PPC {FinalPPC} PPC >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean.Debug ƒ $OutOfDate
- Make {Common} {Debug} Remove >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean.Final ƒ $OutOfDate
- Make {Common} {Final} Remove >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean-All.Debug ƒ $OutOfDate
- Make {Common} {Debug} Remove-All >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- Clean-All.Final ƒ $OutOfDate
- Make {Common} {Final} Remove-All >{MakeOutput}
- Execute {MakeOutput}
- Delete {MakeOutput}
-
- #-----------------------------------------------------------------------
- # Project Variables
- #-----------------------------------------------------------------------
-
- Objects = :{Dbg}Objects:
-
- Sources = "{SpriteWorld}Utils:"
- Headers = "{SpriteWorld}Utils:"
-
- ExtraSources = "{SpriteWorld}Utils:Brian's Extensions:"
- ExtraHeaders = "{SpriteWorld}Utils:Brian's Extensions:"
-
- SWHeaders = "{SpriteWorld}Headers:"
- SWLibs = "{SpriteWorld}Libraries:"
-
- LibName68K = SpriteWorld{Dbg}Utils.o
- LibNamePPC = SpriteWorld{Dbg}Utils.x
-
- Lib68K = {SWLibs}{LibName68K}
- LibPPC = {SWLibs}{LibNamePPC}
-
- 68K ƒ {Lib68K}
- PPC ƒ {LibPPC}
-
- #-----------------------------------------------------------------------
- # Compiler options
- #-----------------------------------------------------------------------
-
- CC68K = {C} # normally SC
- CCPPC = {PPCC} # normally MrC
- LINK68K = Lib
- LINKPPC = PPCLink
-
- Options =
- Warnings = -proto strict -typecheck strict
- IncludesFolders = -i {Headers} -i {ExtraHeaders} -i {SWHeaders}
-
- CCOptions = {IncludesFolders} {Options} {Warnings} -opt {Opt}
- CCOptions68K = {CCOptions} {Mbg} -model far
- CCOptionsPPC = {CCOptions} {Mbg}
-
- LibOptions = -sym {Sym}
- LibOptions68K = {LibOptions}
- LibOptionsPPC = {LibOptions} -xm l
-
- #-----------------------------------------------------------------------
- # These are the sources that we want to include in the library.
- #-----------------------------------------------------------------------
-
- Objects68k = ∂
- {Objects}'Circular Scrolling'.c.o ∂
- {Objects}'Multi-Screen Scrolling'.c.o ∂
- {Objects}SWApplication.c.o ∂
- {Objects}SWCompressResource.c.o ∂
- {Objects}SWDialogUtils.c.o ∂
- {Objects}SWDitherDown.c.o ∂
- {Objects}SWFastLine.c.o ∂
- {Objects}SWFastLine.a.o ∂
- {Objects}SWFixed.c.o ∂
- {Objects}SWFPSReport.c.o ∂
- {Objects}SWGameUtils.c.o ∂
- {Objects}SWParticles.c.o ∂
- {Objects}SWSounds.c.o ∂
- {Objects}SWStats.c.o ∂
- {Objects}BlitPixieRotated.c.o ∂
- {Objects}BlitPixieScaled.c.o ∂
- {Objects}SWLightingSquares.c.o ∂
- {Objects}SWTinting.c.o ∂
- {Objects}SWTranslucentBlitters.c.o
-
- ObjectsPPC = ∂
- {Objects}'Circular Scrolling'.c.x ∂
- {Objects}'Multi-Screen Scrolling'.c.x ∂
- {Objects}SWApplication.c.x ∂
- {Objects}SWCompressResource.c.x ∂
- {Objects}SWDialogUtils.c.x ∂
- {Objects}SWDitherDown.c.x ∂
- {Objects}SWFastLine.c.x ∂
- {Objects}SWFixed.c.x ∂
- {Objects}SWFPSReport.c.x ∂
- {Objects}SWGameUtils.c.x ∂
- {Objects}SWParticles.c.x ∂
- {Objects}SWSounds.c.x ∂
- {Objects}SWStats.c.x ∂
- {Objects}BlitPixieRotated.c.x ∂
- {Objects}BlitPixieScaled.c.x ∂
- {Objects}SWLightingSquares.c.x ∂
- {Objects}SWTinting.c.x ∂
- {Objects}SWTranslucentBlitters.c.x
-
- #-----------------------------------------------------------------------
- # These are modified default build rules.
- #-----------------------------------------------------------------------
-
- {Objects} ƒ {Sources}
- {Objects} ƒ {ExtraSources}
-
- .a.o ƒ .a
- Echo "# Compiling {Default}.a using Asm"
- Asm {DepDir}{Default}.a -o {TargDir}{Default}.a.o
-
- .c.o ƒ .c
- Echo "# Compiling {Default}.c using {CC68K} ({Tgt})"
- {CC68K} {CCOptions68K} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
-
- .c.x ƒ .c
- Echo "# Compiling {Default}.c using {CCPPC} ({Tgt})"
- {CCPPC} {CCOptionsPPC} {DepDir}{Default}.c -o {TargDir}{Default}.c.x
-
- #-----------------------------------------------------------------------
- # The low-level output targets.
- #-----------------------------------------------------------------------
-
- {Lib68K} ƒƒ {Objects68K}
- Echo "# Linking 680X0 library {LibName68K}"
- {LINK68K} {LibOptions68K} {Objects68K} -o {Lib68K}
-
- {LibPPC} ƒƒ {ObjectsPPC}
- Echo "# Linking PowerPC library {LibNamePPC}"
- {LINKPPC} {LibOptionsPPC} {ObjectsPPC} -o {LibPPC}
-
- Remove ƒ
- Echo "# Removing {Tgt} objects"
- Delete -i {Objects68K} {ObjectsPPC}
-
- Remove-All ƒ Remove
- Echo "# Removing {Tgt} binaries"
- Delete -i {Lib68K} {LibPPC}
-
-
-